/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2015
 */

package com.environment_pro.monitor.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.environment_pro.monitor.util.StaticUtil;

/**
 * @author yangfeng 
 * @version 1.0
 * @since 1.0
 */


public class TbDeviceAlarm implements java.io.Serializable{

	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "TbDeviceAlarm";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_DEV_MAC_ADDRESS = "设备编码";
	public static final String ALIAS_DEV_TYPE_CODE = "设备属性编码";
	public static final String ALIAS_DEV_CURRENT_VALUE = "设备属性当前值";
	public static final String ALIAS_FIRST_ALARM_TIME = "首次告警时间";
	public static final String ALIAS_CONFRIM_TIME = "确认时间";
	public static final String ALIAS_RECONVER_TIME = "恢复时间";
	public static final String ALIAS_ALARM_REMIND_TYPE = "告警提醒类型";
	public static final String ALIAS_ALARM_REMIND_TIME = "告警题型时间";
	public static final String ALIAS_STATUS = "告警状态（1、告警  2、确认 4、恢复）";
	public static final String ALIAS_REMARK = "remark";
	public static final String ALIAS_ADD_TIME = "入库时间";
	
	
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	private java.lang.Integer id;

	private java.lang.String devMacAddress;

	private java.lang.String devTypeCode;

	private java.lang.String devCurrentValue;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private  java.util.Date firstAlarmTime;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private  java.util.Date confrimTime;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private  java.util.Date reconverTime;

	private java.lang.String alarmRemindType;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private  java.util.Date alarmRemindTime;

	private java.lang.String status;

	private java.lang.String remark;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private  java.util.Date addTime;

	//columns END

	//date String
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date firstAlarmTimeBegin;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date firstAlarmTimeEnd;
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date confrimTimeBegin;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date confrimTimeEnd;
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date reconverTimeBegin;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date reconverTimeEnd;
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date alarmRemindTimeBegin;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date alarmRemindTimeEnd;
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date addTimeBegin;

	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private java.util.Date addTimeEnd;

	public TbDeviceAlarm(){
	}

	public TbDeviceAlarm(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setDevMacAddress(java.lang.String value) {
		this.devMacAddress = value;
	}
	
	public java.lang.String getDevMacAddress() {
		return this.devMacAddress;
	}
	public void setDevTypeCode(java.lang.String value) {
		this.devTypeCode = value;
	}
	
	public java.lang.String getDevTypeCode() {
		return this.devTypeCode;
	}
	public void setDevCurrentValue(java.lang.String value) {
		this.devCurrentValue = value;
	}
	
	public java.lang.String getDevCurrentValue() {
		return this.devCurrentValue;
	}

	public void setFirstAlarmTimeBegin(java.util.Date value) {
		this.firstAlarmTimeBegin = value;
	}
	
	public java.util.Date getFirstAlarmTimeBegin() {
		return this.firstAlarmTimeBegin;
	}

	public void setFirstAlarmTimeEnd(java.util.Date value) {
		this.firstAlarmTimeEnd = value;
	}
	
	public java.util.Date getFirstAlarmTimeEnd() {
		return this.firstAlarmTimeEnd;
	}
	
	public void setFirstAlarmTime(java.util.Date value) {
		this.firstAlarmTime = value;
	}
	
	public java.util.Date getFirstAlarmTime() {
		return this.firstAlarmTime;
	}

	public void setConfrimTimeBegin(java.util.Date value) {
		this.confrimTimeBegin = value;
	}
	
	public java.util.Date getConfrimTimeBegin() {
		return this.confrimTimeBegin;
	}

	public void setConfrimTimeEnd(java.util.Date value) {
		this.confrimTimeEnd = value;
	}
	
	public java.util.Date getConfrimTimeEnd() {
		return this.confrimTimeEnd;
	}
	
	public void setConfrimTime(java.util.Date value) {
		this.confrimTime = value;
	}
	
	public java.util.Date getConfrimTime() {
		return this.confrimTime;
	}

	public void setReconverTimeBegin(java.util.Date value) {
		this.reconverTimeBegin = value;
	}
	
	public java.util.Date getReconverTimeBegin() {
		return this.reconverTimeBegin;
	}

	public void setReconverTimeEnd(java.util.Date value) {
		this.reconverTimeEnd = value;
	}
	
	public java.util.Date getReconverTimeEnd() {
		return this.reconverTimeEnd;
	}
	
	public void setReconverTime(java.util.Date value) {
		this.reconverTime = value;
	}
	
	public java.util.Date getReconverTime() {
		return this.reconverTime;
	}
	public void setAlarmRemindType(java.lang.String value) {
		this.alarmRemindType = value;
	}
	
	public java.lang.String getAlarmRemindType() {
		return this.alarmRemindType;
	}

	public void setAlarmRemindTimeBegin(java.util.Date value) {
		this.alarmRemindTimeBegin = value;
	}
	
	public java.util.Date getAlarmRemindTimeBegin() {
		return this.alarmRemindTimeBegin;
	}

	public void setAlarmRemindTimeEnd(java.util.Date value) {
		this.alarmRemindTimeEnd = value;
	}
	
	public java.util.Date getAlarmRemindTimeEnd() {
		return this.alarmRemindTimeEnd;
	}
	
	public void setAlarmRemindTime(java.util.Date value) {
		this.alarmRemindTime = value;
	}
	
	public java.util.Date getAlarmRemindTime() {
		return this.alarmRemindTime;
	}
	public void setStatus(java.lang.String value) {
		this.status = value;
	}
	
	public java.lang.String getStatus() {
		return this.status;
	}
	public void setRemark(java.lang.String value) {
		this.remark = value;
	}
	
	public java.lang.String getRemark() {
		return this.remark;
	}

	public void setAddTimeBegin(java.util.Date value) {
		this.addTimeBegin = value;
	}
	
	public java.util.Date getAddTimeBegin() {
		return this.addTimeBegin;
	}

	public void setAddTimeEnd(java.util.Date value) {
		this.addTimeEnd = value;
	}
	
	public java.util.Date getAddTimeEnd() {
		return this.addTimeEnd;
	}
	
	public void setAddTime(java.util.Date value) {
		this.addTime = value;
	}
	
	public java.util.Date getAddTime() {
		return this.addTime;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("DevMacAddress",getDevMacAddress())
			.append("DevTypeCode",getDevTypeCode())
			.append("DevCurrentValue",getDevCurrentValue())
			.append("FirstAlarmTime",getFirstAlarmTime())
			.append("ConfrimTime",getConfrimTime())
			.append("ReconverTime",getReconverTime())
			.append("AlarmRemindType",getAlarmRemindType())
			.append("AlarmRemindTime",getAlarmRemindTime())
			.append("Status",getStatus())
			.append("Remark",getRemark())
			.append("AddTime",getAddTime())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof TbDeviceAlarm == false) return false;
		if(this == obj) return true;
		TbDeviceAlarm other = (TbDeviceAlarm)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

